package com.sxf.service;

import java.util.List;
import java.util.Map;

import com.sxf.domain.Comment;
import com.sxf.domain.CommentMeta;
import com.sxf.domain.CommentVO;
import com.sxf.mybatis.page.Pagination;
import com.sxf.querybean.CommentQuery;

public interface CommentService {

	public Pagination<CommentVO> queryPage(CommentQuery query);

	public List<CommentVO> queryList(CommentQuery query);

	public CommentVO queryOne(CommentQuery query);

	/**
	 * 获取分组后的评论
	 * 
	 * @param commentQuery
	 * @return
	 */
	public Map<Long, CommentVO> queryListComment(CommentQuery query);

	/**
	 * 统计信息
	 * 
	 * @return
	 */
	public Map<String, Integer> queryStatistic();

	public long queryNumber(CommentQuery query);

	public int insert(Comment comment);

	public int update(Comment comment);

	public int delete(Comment comment);

	/**
	 * 返回主键或影响的行数
	 * 
	 * @param commentMeta
	 * @return
	 */
	public long insertCommentMeta(CommentMeta commentMeta);

	public int updateCommentMeta(CommentMeta commentMeta);

	public int deleteCommentMeta(CommentMeta commentMeta);
}
